#ifndef IMINPUT_H
#define IMINPUT_H

#include "iInputDevice.h"
#include <Windows.h>
#include <stdio.h>

extern "C" {
	//HRESULT __declspec(dllexport) CreateInputDevice(HINSTANCE hDLL, iRenderer **pInterface);

	typedef HRESULT (*CREATEINPUTDEVICE)
						(HINSTANCE hDLL, imInput::iInputDevice **pInterface, imInput::InputDevType DevType);

	//HRESULT __declspec(dllexport) ReleaseInputDevice(iRenderer **pInterface);

	typedef HRESULT (*RELEASEINPUTDEVICE)
						(imInput::iInputDevice **pInterface);
};

namespace imInput {
	// Input library
	// Handles loading our library
	class InputLib {
	private:
		HINSTANCE hInst;
		HMODULE hDLL;

		CREATEINPUTDEVICE _CreateInputDevice;

		iInputDevice* InputDev[3];
	public:
		InputLib(void);
		InputLib(HINSTANCE);
		~InputLib(void);

		HRESULT MountLib(char *chAPI);

		void Release(void);
		iInputDevice* GetDevice(InputDevType DevType);
		HMODULE GetModule(void) { return hDLL; };
	};
};

#endif